# Contributor: Bart Ribbers <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-frameworks
maintainer="team/kde <bribbers@disroot.org>"
pkgname=attica
pkgver=6.7.0
pkgrel=0
pkgdesc="Freedesktop OCS binding for Qt"
url="https://www.kde.org/"
arch="all"
license="LGPL-2.0-or-later"
makedepends="
	doxygen
	extra-cmake-modules
	qt6-qtbase-dev
	qt6-qttools-dev
	samurai
	"
subpackages="$pkgname-dev $pkgname-doc"
_repo_url="https://invent.kde.org/frameworks/attica.git"
source="https://download.kde.org/stable/frameworks/${pkgver%.*}/attica-$pkgver.tar.xz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_QCH=ON
	cmake --build build
}

check() {
	# providertest requires network access
	ctest --test-dir build --output-on-failure -E "providertest"
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
acf5eb0db3aa781fe29e51920b81a480844386c541bd7700aeebde63394a1c83eeed5aed970db0afef13dd57878faca8b5c33cd7b41f30abd8c4b86f5ee56a72  attica-6.7.0.tar.xz
"
